# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=stepic
pkgver=0.4
pkgrel=4
groups=('blackarch' 'blackarch-stego')
arch=('any')
pkgdesc='A python image steganography tool.'
url='http://domnit.org/stepic/doc/'
license=('GPL')
depends=('python2' 'python2-pillow6')
source=("http://domnit.org/stepic/dist/$pkgname-${pkgver}~bzr.tar.gz"
        'import.patch')
sha512sums=('d1c4a685358185f9a71bf70b476a1c899ce8cd9305678395598d3b7485eaaf9d700df38423d1e315de5f0fd5d91b1ef164e4342bdc03bcca8b566ec626977023'
            '9b2a75b10b073052bddb28fdeeb21f49826e2d87d32c4e7cf7d7a21a3aa986474449d51067ab6a4a9fb8230fac67bbde43244c9b35c0d50ed4f48082f4881d7e')

prepare() {
  cd "$pkgname-$pkgver~bzr"

  patch -Np1 -i "$srcdir/import.patch"
}

build() {
  cd "$pkgname-$pkgver~bzr"

  python2 setup.py build
}

package() {
  cd "$pkgname-$pkgver~bzr"

  python2 setup.py install --root="$pkgdir" --skip-build

  install -Dm 644 "$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" TODO
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

